load("@rules_cc//cc:defs.bzl", "cc_library")

cc_library(
    name = "stemmer",
    hdrs = ["include/libstemmer.h"],
    features = [
        "parse_headers",
    ],
    includes = ["include"],
    srcs = glob([
        "src_c/*.c",
        "src_c/*.h",
    ]) + [
        "runtime/api.c",
        "runtime/api.h",
        "runtime/header.h",
        "runtime/utilities.c",
        "libstemmer/libstemmer.c",
        "libstemmer/modules.h",
    ],
    visibility = ["//visibility:private"],
)

alias(
    name = "libstemmer",
    actual = ":stemmer",
    visibility = ["//visibility:public"],
)
